The invention relates to a storage device for use as an external storage device of a computer or the like and a method for controlling the storage device. More particularly, this invention relates to a storage device capable of avoiding a write fault error or read error which may be caused in switching from power save mode or migration mode to ordinary mode for read/write.
As an external storage device of a computer or the like, a storage device employing a circular magnetic disk as a recording medium is used. In such a storage device, reduction of power consumption is achieved by switching to power save mode in which supply of power to a read/write circuit is stopped or the operating speed is reduced and the like when a command (instruction) is received from a host. Further, in the storage device, if time in which no read/write command is received reaches a predetermined time a migration mode is activated. In this migration mode reading of the servo pattern on the magnetic disk is carried out one by one so as to reduce a time for which a sense current flows, thereby prolonging the life of the magnetic head.
However, when changing from the above power save mode or migration mode back to the ordinary mode there is a tendency that the on-track condition of the magnetic head becomes unstable. It has been known by experience that a write fault error or read error is likely to occur when the on-track condition of the magnetic head becomes unstable. Countermeasure for this phenomenon has been seriously demanded.
FIG. 9 is a block diagram which shows an electrical structure of a conventional storage device 20. The storage device 20 comprises a head disk assembly (HDA) 110, a printed circuit board 120 and a connector 140. The hard disk assembly 110 is configured with sealing magnetic disks magnetic disks 1111-111n, magnetic heads 1131-113m and the like in a container formed of base and cover. The printed circuit board 120 incorporates various circuits such as (HDC) circuit 121 and micro processing device (MPU) 124. The connector 140 electrically connects components in the HDA 110 to the printed circuit board 120.
The storage device 20 is connected to the CPU 150 provided in a not illustrated host system. This storage device 20 reads/writes to the magnetic disks 1111-111n according to a read/write command from the CPU 150. The command from the CPU 150 also includes power save mode switching command for switching from the ordinary mode to the previously described power save mode.
n sheets of circular recording mediums as the magnetic disks 1111-111n are provided in the HDA 110 for magnetically storing the data. These magnetic disks 1111-111n are provided in such a way that they overlay each other with a constant gap between in an axial direction. A spindle motor (SPM) 112 rotates the aforementioned magnetic disks 1111-111n at high speed. Each of the magnetic heads 1131-113m comprises a head core having a very small gap and a coil wound around the head core. These magnetic heads 1131-113m are arranged respectively near the magnetic disks 1111-111n.
The magnetic heads 1131-113m write data into the magnetic disks 1111-111n using the magnetic field generated by a recording current supplied to their coil at the time of writing, whereas they magnetically detect data which is recorded in the magnetic disks 1111-111n as a reproduced current. The number m of these magnetic heads 1131-113m is appropriately selected depending on the number n of the magnetic disks 1111-111n.
A carriage 114 is provided in the vicinity of the magnetic disks 1111-111n so as to support the magnetic heads 1131-113m. A voice coil motor (VCM) 115 rotates the carriage 114 to move the magnetic heads 1131-113m. A flexible print circuit sheet (FPC) 116 is a sheet-like flexible wiring material for connecting between the carriage 114 and each not illustrated terminal of a connector 140.
A head integrated circuit (IC) 117 is composed of a write amplifier and a not illustrated preamplifier and arranged in parallel on the surface of the FPC 116. The write amplifier changes over the polarity of the recording current to be supplied to the magnetic heads 1131-113m depending on write data supplied from the CPU 150 and the preamplifier amplifies reproduction voltage (read signal) detected by the magnetic heads 1131-113m.
A printed circuit board 120 is an externally mounted board attachable to/detachable from a rear face of the HDA 110 via a connector 140. The connector 140 ensures an interface between components of the HDA 110 and various circuits mounted on the printed circuit board 120. In the printed circuit board 120, the HDC circuit 121 is connected to the CPU 150 through an interface such as not illustrated small computer system interface (SCSI) bus or the like so as to send/receive various commands (read command, write command and the like), write data to be written into the magnetic disks 1111-111n read data read out from the magnetic disks 1111-111n and the like. The HDC circuit 121 generates a control signal or the like for controlling a format for recording/reproduction in the magnetic disks 1111-111n or the like.
A flash read only memory (FROM) 122 stores programs for read/write control and power supply control to be carried out by the HDC circuit 121 and MPU 124, and it is accessed by the HDC 121 and the MPU 124, when the programs are to be executed. The random access memory (RAM) 123 temporarily stores write data input from the CPU 150, read data read out from the magnetic disks 1111-111n and various data generated during execution of the above program.
A read channel 125 comprises a modulation circuit for writing write data to the magnetic disks 1111-111n, a parallel/serial conversion circuit for converting parallel write data to serial data, a demodulation circuit for reading read data from the magnetic disks 1111-111n and the like. Further, the read channel 125 comprises a serial/parallel conversion circuit for converting serial read data to parallel data, a synthesizer circuit for generating a timing signal for respective parts of the device by multiplying the frequency of an oscillation circuit using a crystal oscillator and the like.
The MPU 124 controls respective parts of the device and its main control includes read/write control, power save mode control, migration mode control and the like. A detail of an operation of this MPU 124 will be described later. A servo demodulation circuit 126 demodulates servo pattern for positioning stored in the magnetic disks 1111-111n by peak hold, integration or the like. A voile coil motor (VCM) driving circuit 127 drives the VCM 115 and is provided with a not illustrated power amplifier for supplying a driving current to the VCM 115 through a connector 140. A spindle motor (SPM) driving circuit 128 drives the SPM 112 and is provided with a not illustrated power amplifier (for supplying a driving current via the connector 140.
The MPU 124 recognizes a servo pattern demodulated by the servo demodulation circuit 126 and controls the position of the magnetic head 1131-113m by controlling each of driving currents in the VCM driving circuit 127 and SPM driving circuit 128. Further, the MPU 124 controls the HDC circuit 121, read channel 125, head IC 117 and the like. A power source 129 supplies electric power to the respective parts of the device. The MPU 124 controls an electric power supply from the power source 129.
Next, an operation of the conventional storage device 20 will be described. Hereinafter, mainly read/write operation immediately after transfer from the power save mode to ordinary mode and read/write operation immediately after transfer from migration mode to ordinary mode will be described. When electric power is supplied to the respective parts of the device from the power source 129 by control of the MPU 124, the SPM 112 is driven by the SPM driving circuit 128 under a control of the MPU 124, and the magnetic disks 1111-111m are driven. The servo pattern recorded on the magnetic disks 1111-111m is read by the magnetic heads 1131-113m. The information of the servo pattern is demodulated by the servo demodulation circuit 126 via the head IC 117 and read channel 125 and input to the MPU 124.
Thus, the MPU 124 recognizes positions of the magnetic heads 1131-113m on the magnetic disks 1111-111n from information of the servo pattern. When a read/write command is input to the MPU 124 from the CPU 150 via the HDC circuit 121, the MPU 124 controls the VCM driving circuit 127 according to the information of the servo pattern from the servo demodulation circuit 126. Consequently, the VCM 115 is driven so as to carry out seek operation in which the magnetic heads 1131-113m are moved up to a predetermined position. When they are moved up to the predetermined position, read/write operation to the magnetic disks 1111-111n by the magnetic heads 1131-113m is carried out, and read/write data is output from the head IC 117 to the MPU 124. After that, the read/write operation is carried out according to a read/write command input from the CPU 150.
When the power save mode transfer command is input to the MPU 124 from the CPU 150 via the HDC circuit 121, the MPU 124 controls for transfer from ordinary mode to power save mode. More specifically, the MPU 124 stops electric power supply to the head IC 117 and read channel 125 (sleep state). Consequently, power consumption of the entire storage device 10 is saved.
Because the head IC 117 is in the stopped condition in this power save mode, no current flows to the magnetic heads 1131-113m. In this case, read operation for the servo pattern on the magnetic disks 1111-111n is not carried out. Therefore, the MPU 124 cannot recognize the servo pattern information. Thus, since the magnetic heads 1131-113m are not in the on-track condition in the power save mode, the read/write operation cannot be performed.
When in power save mode, a read/write command is input to the MPU 124 from the CPU 150 via the HDC circuit 121, the MPU 124 controls to supply normal electric power to the head IC 117 and read channel 125 so as to transfer from the power save mode to ordinary mode. The MPU 124 makes the magnetic heads 1131-113m track the magnetic disks 1111-111n according to the information of the servo pattern supplied by the servo demodulation circuit 126, and after that, the read/write operation is carried out.
When following read/write command is not input, for example, within than 15 seconds after a read/write command is input to the MPU 124, the MPU 124 switches from the ordinary mode to the migration mode. More specifically, by controlling the read channel 125 and head IC 117, the MPU 124 controls the magnetic heads 1131-113m in the on-track condition to read, for example, one (or two or more) servo patterns at a time. Consequently, time taken for current to flow to the magnetic heads 1131-113m can be shortened as compared to a case in which all servo patterns are read, and the life of the head can be extended.
In this migration mode, the servo pattern information (information of one or two servo patterns read at a time), which is read by the magnetic heads 1131-113m, is demodulated by the servo demodulation circuit 126 and input to the MPU 124. In this case, the MPU 124 recognizes the positions of the magnetic heads 1131-113m. However, because the quantity of the servo pattern information is smaller as compared to ordinary mode, the above recognition of the MPU 124 is not complete. Therefore, although the magnetic heads 1131-113m are barely in the on-track condition, the positions of the magnetic heads 1131-113m are in unstable condition. This is due to the fact that the position control based on a small quantity of the servo patter information is unstable.
In the migration mode, when a read/write command is input to the MPU 124 from the CPU 150 via the HDC circuit 121, the MPU 124 controls the magnetic heads 1131-113m to read all the servo patterns so as to switch from the migration mode to the ordinary mode. The MPU 124 then executes the read/write operation according to the read/write command.
It has been described above that in the power save mode of the conventional storage device the magnetic heads 1131-113m are not in the on-track condition relative to the magnetic disks 1111-111n and the MPU 124 is not capable of obtaining the servo pattern information. It has been also described above that in the power save mode of the conventional storage device, when a read/write command is input in the power save mode, the read/write operation is carried out after switching from the power save mode to the ordinary mode.
However, in reality, tracking on an accurate position often fails immediately after a change from the power save mode to the ordinary mode, even when a control for placing the magnetic heads 1131-113m in the on-track condition is carried out in a condition that no servo pattern information exists. Therefore, there is a problem that a write fault error or a read error frequently occurs when the read/write operation is carried out with the magnetic heads not completely in the on-track condition.
It has also been described above that because the quantity of the servo pattern information is small on the MPU 124, the magnetic heads 1131-113m are barely in the on-track condition in the migration mode of the conventional storage device and hence their positions are very unstable. It has also been described above that, in the migration mode of the conventional storage device when a read/write command is input in the migration mode, the read/write operation is carried out after changing from the migration mode to the ordinary mode.
However, in reality, there is a problem that the write fault error or the read error frequently occurs like the above-described case of the power save mode when the read/write operation is carried out by the magnetic heads 1131-113m in the unstable on-track condition immediately after changing from the migration mode to the ordinary mode.
In light of problems described above, it is an object of the invention to provide a storage device capable of avoiding occurrence of write fault error or read error immediately after changing from the power save mode or the migration mode to the ordinary mode. It is also an object of this invention to provide a method for controlling the storage device.
According to one aspect of this invention, a head reads or writes data from or on a recording medium, and a read/write control unit performs read/write for two times when a command for reading data from or writing data on the recording medium is received from a host while in a power save mode.
According to another aspect of this invention, a head reads or writes data from or on a recording medium, a seek unit seeks the head to a predetermined position on the recording medium when a command for reading data from or writing data on the recording medium is received from a host while in a power save mode, and a read/write control unit performs read/write by controlling the head based on the received read/write command after the seek operation by the seek unit is over.
According to still another aspect of this invention, a read/write step is provided in which read/write is performed two times when a command for reading data from or writing data on a recording medium is received from a host while in a power save mode, by controlling a head, which actually performs the read/write, based on the received read/write command.